package com.cellulam.framework.scheduled;

import com.cellulam.framework.scheduled.exceptions.TaskDelayException;
import com.cellulam.framework.scheduled.exceptions.TaskExpireException;
import com.cellulam.framework.scheduled.exceptions.TaskTerminateException;

public interface TaskProcessor {
    ExecuteResult run(ScheduleTask task) throws TaskDelayException, TaskTerminateException, TaskExpireException;

    void processComplete(ScheduleTask task, ExecuteResult result);

    void processExpire(ScheduleTask task);

    void processBegin(ScheduleTask task);

    void processException(ScheduleTask task, Exception e);
}
